<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>缩影信息</title>
    
    <!--加载模板的东东-->
    <link rel="stylesheet" href="startup/flat-ui/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="startup/flat-ui/css/flat-ui.css">
    <link rel="stylesheet" href="startup/common-files/css/icon-font.css">
    <link rel="stylesheet" href="startup/common-files/css/animations.css">
    <link rel="stylesheet" href="static/css/style.css">
    <!--加载 缩影 CSS-->
    <link rel="stylesheet" href="public/css/default.css">
</head>
<body>
    <div class="container">
        <div class="soryin">
            <!--缩影标题-->
            <div class="title">
                <div class="title_left">广州国际绿色建筑展</div>
                <div class="title_right">!</div>
                <div class="clearfix"></div>
            </div>

            <!--相关信息-->
            <table class="table table-hover">
                <tr>
                    <th width="33%">
                        <div style="width:60px;margin:0 auto;" align="center">
                            <span style="font-size:70px;line-height:70px;">3</span>
                            <span style="float:right">天</span>
                            新鲜
                        </div>
                    </th>
                    <th width="34%">
                        <center>
                            <span style="font-size:70px;line-height:70px;">4%</span><br/>
                            相关
                        </center>
                    </th>
                    <th width="33%">
                        <center>
                            <span style="font-size:70px;line-height:70px;">图</span><br/>
                            展会
                        </center>
                    </th>
                </tr>
            </table>
        </div>
    </div>

    <!-- 插入响应的Block模版 -->
    <div class='address_layout'></div>
    <div class='description_layout'></div>
    <div class='figure_layout'></div>
    <div class='images_layout'></div>
    <div class='price_layout'></div>
    <div class='time_layout'></div>
    <div class='weather_layout'></div>



    <!-- 加载模板的一坨坨 JS -->
    <script src="startup/common-files/js/jquery-1.10.2.min.js"></script>
    <script src="startup/common-files/js/jquery.scrollTo-1.4.3.1-min.js"></script>
    <script src="startup/flat-ui/js/bootstrap.min.js"></script>
    <script src="startup/common-files/js/modernizr.custom.js"></script>
    <script src="startup/common-files/js/page-transitions.js"></script>
    <script src="startup/common-files/js/easing.min.js"></script>
    <script src="startup/common-files/js/jquery.svg.js"></script>
    <script src="startup/common-files/js/jquery.svganim.js"></script>
    <script src="startup/common-files/js/jquery.backgroundvideo.min.js"></script>
    <script src="startup/common-files/js/froogaloop.min.js"></script>
    <script src="startup/common-files/js/startup-kit.js"></script>
    
    <!--百度地图 JS-->
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=Kupb0NGlUGZ20jFFyeFmzeH6"></script>
	<!-- 加载各个Block -->
    <script type="text/javascript">
    	var json=null;
    	var soryinId = getUrlParam('id');
        $.ajax({
		　　    dataType: 'jsonp',
		　　    jsonp: 'callback',
		　　    url: "http://sy.hais1992.com/SoryinServerDB/Soryin_show?key=Soryin&soryin.id="+soryinId,
		       success: function (data) {
		    	   json = $.parseJSON(data);	//获取json
			   		//alert("ajax.json: "+json.Soryin.time);
		    	   //根据Block 加载相应Block
		    	   if(json.soryin.blockId.address!=null){	//地址
		    		   $('.address_layout').load('./address.html'); 	//加载默认模板
		    		   $('.weather_layout').load('./weather.html'); 
		    	   }
		    	   
		    	   if(json.soryin.blockId.description!=null){	//描述
		    		   $('.description_layout').load('./description.html'); 
		    	   }
		    	   
		    	   if(json.soryin.blockId.figure!=null){		//人物
		    		   $('.figure_layout').load('./figure.html'); 
		    	   }
		    	   
		    	   if(json.soryin.blockId.images!=null){		//图片
		    		   $('.images_layout').load('./images.html'); 
		    	   }
		    	   
		    	   if(json.soryin.blockId.price!=null){			//金钱
		    		   $('.price_layout').load('./price.html'); 
		    	   }
		    	   
		    	   if(json.soryin.blockId.time!=null){			//时间
		    		   $('.time_layout').load('./time.html'); 
		    	   }
		    	   
		    	   if(json.soryin.blockId.weather!=null){		//天气
		    		   $('.weather_layout').load('./weather.html'); 
		    	   }
		    	   
		       }
		});
        
   
      	//获取url中的参数
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null) return unescape(r[2]); return null; //返回参数值
        }
        
    </script>
    <!-- 结束插入响应的Block模版 -->

    </body>
</html>
